import type { RouteRecordRaw } from 'vue-router'
import type { Component } from 'vue'

export interface RouteMeta {
  title: string
  icon?: string
  hidden?: boolean
  noCache?: boolean
  breadcrumb?: boolean
  alwaysShow?: boolean
  activeMenu?: string
  affix?: boolean
}

export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta' | 'children' | 'redirect' | 'component'> {
  name: string
  meta: RouteMeta
  component?: Component | string
  children?: AppRouteRecordRaw[]
  props?: Record<string, any>
  fullPath?: string
  redirect?: string | { path: string }
}